export default ({ app: { router } }) => {
  router.afterEach((to, from) => {
    window._hmt = window._hmt || []
    const hm = document.createElement("script")
    hm.src = "https://hm.baidu.com/hm.js?95747c44606e9aec652c2da4d83fe9ac"
    const s = document.getElementsByTagName("script")[0]
    s.parentNode.insertBefore(hm, s)
    window._hmt.push(["_trackPageview", to.fullPath])
  })
}
